<?php
/**
 * crontab run file
 * Created by PhpStorm.
 * User: John
 * Date: 17-1-4
 * Time: 上午10:49
 */

$servicePath = dirname(__DIR__);
require $servicePath . '/../thinkphp/base.php';

require $servicePath . '/zft.conf.php';
require $servicePath . '/../vendor/autoload.php';



$crontabFile = $servicePath . '/Conf/crontab.conf.php';

//echo $crontabFile;die;
$contabArr = include($crontabFile);

$taskList = $contabArr['task_list'];
//初始化
$jobby = new Jobby();
//添加任务
foreach ($taskList as $key => $val) {
    $jobby->add($key, $val);
}

//开启任务
$jobby->run();